<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
	function doAdd(num1, num2){
		if(arguments.length == 1){
			console.log(num1+10);	//20
		}else if(arguments.length == 2){
			console.log(arguments[0]+num2);	//50
		}
	};
	doAdd(10);
	doAdd(30, 20)
</script>
</head>

<body>
</body>
</html>
